<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="UTF-8">
    <base href="<%=basePath%>">
    <title>管理界面</title>
    <style type="text/css">
        *{
            margin: 0px;
            padding: 0px;
        }
        .studentHead{
            width: auto;
            height: 50px;
            border: solid;
            text-align: center;
        }
        .head_p{
            font-size: 40px;
        }
        .login_p{
            color: blue;
            font-size: 10px;
            position: absolute;
            margin-top: 10px;
            margin-left: 1740px;
        }
        .studentBody{
            width: 100%;
            height: 100%;
            border: solid;
            display: flex;
        }
        li{
            display: block;
            width: auto;
            height: 30px;
            background: #fcc;
            border: solid;
        }
        a{
            text-decoration: none;
        }
        .body_left{
            width: 150px;
            border: solid;
            width:20%;
            height:900px;
            overflow-y: auto;
        }
        .body_right{
            width: 80%;
            height: calc(100% - 50px);
            overflow-y:auto;
            padding-left: 19px;
            border: solid;
        }
    </style>
</head>
<body>
<div class="studentHead">
    <p class="head_p">宿舍管理系统</p>
    <p class="login_p">${sessionScope.student.sName},登录在线</p>
</div>
<div class="studentBody">
    <div class="body_left">
        <ul>
            <li><a href="student/queryAllManager">查询管理员信息</a></li>
            <li><a href="student/queryStudentBySid">查询学生信息</a></li>
            <li><a href="student/toUpdateStudent">修改学生信息</a></li>
            <li><a href="student/checkNotice">提交报修信息</a></li>
            <li><a href="student/queryNoticePage">查询公告信息</a></li>
        </ul>
    </div>
    <div class="body_right">
        <table cellspacing="20" cellpadding="10">
            <thead>
             <tr>
                 <th>账号</th>
                 <th>密码</th>
                 <th>姓名</th>
                 <th>电话</th>
                 <th>职权</th>
             </tr>
            </thead><hr/>
            <tbody>
            <c:forEach var="manager" items="${mlist}">
                <tr>
                    <td>${manager.managerId}</td>
                    <td>${manager.mPassword}</td>
                    <td>${manager.mName}</td>
                    <td>${manager.mPhone}</td>
                    <td>${manager.mDetail}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <table cellspacing="20" cellpadding="10">
            <thead>
            <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>密码</th>
                <th>电话</th>
                <th>学院</th>
                <th>专业</th>
                <th>宿舍号</th>
            </tr>
            </thead><hr/>
            <tbody>
                <tr>
                    <td>${student1.sId}</td>
                    <td>${student1.sName}</td>
                    <td>${student1.sPassword}</td>
                    <td>${student1.sPhone}</td>
                    <td>${student1.sCollege}</td>
                    <td>${student1.sProfession}</td>
                    <td>${student1.sDormId}</td>
                </tr>
            </tbody>
        </table>
        <hr/>
        <h1>${msg}</h1>
        <hr/>
        <h1>${rmsg}</h1>
        <hr/>
        <P>公告展示</P>
        <h1>${nmsg}</h1>
        <table cellpadding="20" cellspacing="10">
            <thead>
                <tr>
                    <th>公告信息</th>
                    <th>时间</th>
                </tr>
            </thead>
            <tbody>
              <c:forEach var="notice" items="${list}">
                    <tr>
                        <td>${notice.nDetail}</td>
                        <td>${notice.nDate}</td>
                    </tr>
              </c:forEach>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>
